
#ifndef KEY_VALUE_CONFIG_VALUE
#define KEY_VALUE_CONFIG_VALUE

#include <string>

class Value {
public:
	class Store {
	public:
		virtual ~Store(){}
		virtual bool Has(const std::string& key) const = 0;
		virtual bool Get(const std::string& key, std::string& value) const = 0;
		virtual bool Set(const std::string& key, const std::string& value) = 0;
	};

	Value(Store* s, const std::string& key);

	bool Has() const;
	template <typename T> bool Get(T& v) const;
	template <typename T> bool Set(const T& v);

protected:
	Store* store_;
	const std::string key_;
};

#endif